/**
 * @author xuyh0817
 * @email xuyh0817@foxmail.com
 * @date 2022-02-16 01:41
 * @version 2.0.0
 * @doc todo
 * @website todo
 * @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
 */
import { COMPONENT_TYPE } from '../../constants'

export default [
  {
    id: '1',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'value',
      rules: [],
      label: '默认值',
      extra: 'value(v-model) 数字框内容',
    },
    attrs: {
      value: 1,
      placeholder: '请输入默认值'
    }
  },
  {
    id: '2',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'placeholder',
      rules: [],
      label: '提示内容',
      extra: 'placeholder 提示内容',
    },
    attrs: {
      maxLength: 100,
      value: '请输入',
      type: 'text',
      allowClear: true,
      placeholder: '请输入'
    }
  },
  {
    id: '3',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'max',
      rules: [],
      label: '最大值',
    },
    attrs: {
      value: 9999,
      min: -9999,
      placeholder: '请输入最大值'
    }
  },
  {
    id: '4',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'min',
      rules: [],
      label: '最小值',
    },
    attrs: {
      value: -9999,
      max: 9999,
      placeholder: '请输入最小值'
    }
  },
  {
    id: '5',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'precision',
      rules: [],
      label: '数值精度',
    },
    attrs: {
      value: 0,
      min: 0,
      placeholder: '请输入数值精度'
    }
  },
  {
    id: '6',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'step',
      rules: [],
      label: '步数',
      extra: '每次改变步数，可以为小数',
    },
    attrs: {
      value: 1,

      allowClear: false,
      placeholder: '请输入步数',
      type: 'number'
    }
  },
  {
    id: '7',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'disabled',
      rules: [],
      label: '禁用状态',
      extra: '是否禁用状态，默认为 false',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '8 ',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'size',
      rules: [],
      label: '控件大小',
      extra: '控件大小。注：标准表单内的输入框大小限制为 large。可选 large default small ',
    },
    attrs: {
      value: 'default',
      buttonStyle: 'solid',
      children: [
        {
          value: 'large',
          label: 'large'
        },
        {
          value: 'default',
          label: 'default'
        },
        {
          value: 'small',
          label: 'small'
        }
      ]
    }
  }
]
